
cmake_minimum_required(VERSION 3.18.1)

# Declares and names the project.

project("opencvstudy")


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/../jniLibs/${CMAKE_ANDROID_ARCH_ABI}")


file(GLOB cpp_source *.cpp)

include_directories(include)
add_library( # Sets the name of the library.
             opencvstudy

             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
             ${cpp_source} )

find_library( # Sets the name of the path variable.
              log-lib
              log )


target_link_libraries( # Specifies the target library.
                       opencvstudy

                       # Links the target library to the log library
                       # included in the NDK.
                        opencv_java4
                        android
                       ${log-lib} )
